<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>判断</title>
</head>
<body>
<div id="app">

    <h1 v-if="type==='A'">1</h1>
    <h1 v-else-if="type==='B'">2</h1>
    <h1 v-else-if="type==='C'">3</h1>
    <h1 v-else>4</h1>

</div>


<!--1.导入vue.js-->
<script src="https://cdn.jsdelivr.net/npm/vue@2.5.21/dist/vue.min.js"></script>
<script>
    var vm = new Vue({
        el: "#app",
        // Model：数据
        data: {
            // ok: true
            type: 'A'
        }
    });
</script>

</body>
</html>